home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
t3_1
/
nexttsrc.lha
/
nexttsources
/
sources
/
sys
/
dump_comex.t
< prev
next >
Wrap
Text File
|
1988-02-05
|
1KB
|
31 lines
(herald dump_comex
(env tsys (osys table) (osys inf_vector) (osys dump)))
;;; This file is seperate because dump is not included in the VM;
;;; whereas, load is.
(define (comex-encoder obj)
(if (comex? obj)
(return 'comex '() (stype-selectors comex-stype))
(return nil nil nil)))
;++ flush this
(define (write-comex-to-file spec comex)
(with-open-ports ((port (open spec 'dump)))
(set-encoder port comex-encoder)
(write port comex)))
(define (write-comex port comex)
(let ((things (make-infinite-vector 60 false 'dump-vector))
(status (make-dump-status))
(delimits '())
(encoder (lambda (x) (ignore x) (return nil nil nil)))
(objects (make-table 'dumped-objects)))
(set-encoder port comex-encoder)
(push delimits (dump-status-count status))
(vectorize comex things status objects encoder)
(dump-port port things status objects (reverse! (cons -1 delimits)))
(recycle things)
(recycle objects)
(no-value)))